<style type="text/css">
body{background:#eee}
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.55rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:3.6rem}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.55rem}
.weui_cell_hd {
    padding: 0.6rem;
	padding-left: 0;
}
</style>
<div class="fui-page order-create-page fui-page-current" ng-if="pagedata.op == 'main'">
	 <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">确认订单</div>
		<div class="fui-header-right"></div>
	</div>
	<div class="fui-content">
	<div style="padding:0.5rem;">
		<div class="weui_cells" style="margin-top:0">
		<div class="weui_cell">
                <div class="weui_cell_hd weui_cell_primary">
                    <span>活动名称</span>
                </div>
                <div class="weui_cell_ft" >{{pagedata.activity.title}}</div>
        </div>
		<div class="weui_cell">
                <div class="weui_cell_hd weui_cell_primary">
                    <span>活动地址</span>
                </div>
                <div class="weui_cell_ft" >{{pagedata.activity.address}}</div>
        </div>
		<div class="weui_cell">
                <div class="weui_cell_hd weui_cell_primary">
                    <span>活动时间</span>
                </div>
                <div class="weui_cell_ft">{{pagedata.activity.time}}</div>
        </div>
		<div class="weui_cell" ng-show="pagedata.activity.money > 0">
                <div class="weui_cell_hd weui_cell_primary">
                    <span>报名费用</span>
                </div>
                <div class="weui_cell_ft">{{pagedata.activity.money}}元</div>
        </div>
		 </div>
		<!--<div class="weui_cells weui_cells_form">			
			<div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">{{pagedata.pluginset.nametitle||'联系人'}}</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" placeholder="输入您的姓名" ng-model="pagedata.post.name">
                </div>
            </div>
			<div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">联系电话</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="number" placeholder="输入您的电话" ng-model="pagedata.post.mobile">
                </div>
            </div>
            <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">备注</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="text" placeholder="输入备注内容" ng-model="pagedata.post.remark">
                </div>
            </div>
        </div>-->
		<div ng-if="pagedata.post.diyfields.length>0">
			<div ng-include="sys_html('common/_diyform',true)"></div>
		</div>
	</div>
	</div>
	<div ng-if="pagedata.post.money>0" class="fui-navbar order-create-checkout">
		<a href="javascript:;" class="nav-item total" style="text-align:left;padding-left:0.5rem">
			<span  class="text-danger bigprice">&yen; 
				<span class="totalprice" style="font-size:1.2rem">{{price(pagedata.post.money) || '0.00'}}</span>
			</span>
		</a>
		<a href="javascript:;" class="nav-item btn btn-danger buybtn" ng-if="!pagedata.order_id" ng-click="pagedata.pay_submit(pagedata.post,'jy_adbaoming/book/notice/','jy_adbaoming/order//status=2')" >
			<div class="fee-tagup-nav">
				确认支付
			</div>
		</a>
		<a href="javascript:;" class="nav-item btn btn-danger buybtn" ng-if="pagedata.order_id" ng-click="access_json('jy_adbaoming/order/')" >
			<div class="fee-tag-nav">
				查看订单
			</div>
		</a>
	</div>
	<div ng-if="pagedata.post.money==0" class="fui-navbar order-create-checkout">
		<a href="javascript:;" class="nav-item btn btn-danger buybtn" ng-click="post(pagedata.post,'jy_adbaoming/book/notice/')" >
			<div class="fee-tagup-nav">
				确认报名
			</div>
		</a>
	</div>
</div>
<script type="text/javascript">
window.scope.location(function(res){
		console.log(res)
		scope.$apply(function(){
			scope.pagedata.post.address = res.address;
		});
});
scope.pagedata.pay_submit=function(post,post_url,complete_url){
	scope.post_json(post_url,post,function(result){
		if(result.order_id){
			scope.pagedata.order_id=result.order_id;
			scope.$evalAsync();
			scope.tool.pay(result.pay_id,function(res){
					if(res.type=='success'){
						scope.message('支付成功！','success',complete_url);
					}else{
						scope.message('支付失败！','success',complete_url);
					}
			},'','',complete_url,complete_url);
		}
	});
}
scope.pagedata.getprovince=function(){
	scope.get('core/member.set/getprovince/',function(res){
		scope.pagedata.extradata.province=res.province;
		scope.$evalAsync();
	});
}
scope.pagedata.getprovince();
</script>